<style scoped lang="scss">

</style>
<template>
    <table-page-block>
        <template slot="head">

            <div>
                <el-button type="primary" @click="clickExcelExport">Excel导出</el-button>
            </div>


            <el-date-picker
                    :clearable="false"
                    v-model="tableSearch.date"
                    type="daterange"
                    align="right"
                    unlink-panels
                    range-separator="-"
                    start-placeholder="开始时间"
                    end-placeholder="结束时间"
                    :picker-options="pickerOptions">
            </el-date-picker>
            <el-input v-model='tableSearch.ip' placeholder="IP地址" style="width:300px;"/>
            <el-input v-model='tableSearch.api' placeholder="操作接口" style="width:300px;"/>
            <el-input v-model='tableSearch.log' placeholder="日志内容" style="width:300px;"/>
            <el-button type="primary" @click="clickSearch">搜索</el-button>

        </template>
        <table-banner v-model="tablePage"  @update="updateList"/>

        <div class="table-content">
            <el-table
                    @selection-change="changeSelection"
                    :data="tableList"
                    border>
                <el-table-column
                        type="selection"
                        width="50">
                </el-table-column>
                <el-table-column
                        prop="datetime"
                        label="时间"
                        width="180">
                </el-table-column>
                <el-table-column
                        prop="accountName"
                        label="用户"
                        width="180">
                </el-table-column>
                <el-table-column
                        prop="ip"
                        label="IP地址"
                        width="200">
                </el-table-column>
                <el-table-column
                        prop="api"
                        label="接口"
                        width="300">
                </el-table-column>
                <el-table-column
                        prop="log"
                        label="日志">
                </el-table-column>
            </el-table>
        </div>
    </table-page-block>
</template>

<script>
    import TablePageBlock from "../../components/table-page-block/TablePageBlock";
    import SystemLogMethods from "./SystemLogMethods";
    import TableBanner from "../../components/table-page-block/table-banner";

    export default {
        components: {TableBanner, TablePageBlock},
        mixins: [SystemLogMethods],
        props:{
            type:{
                type:Number,
                default:2
            }
        },
        data() {
            return{

            }
        },
        methods: {

        },
        filters:{

        },
        mounted() {
            console.log(this)
        }
    }
</script>
